import http from 'utils/request';

const { get, post } = http('admin');
/**
 * 设备
 */
// 列表--分页获取
export const getEquipmentList = params => get('/api/equip/equipment', params);
// 新增
export const addEquipment = params => post('/api/equip/equipment/createEquipment', params);
// 编辑
export const editEquipment = params => post('/api/equip/equipment/updateEquipment', params);
// 删除
export const delEquipment = params => post('/api/equip/equipment/deleteEquipment', params);
// 获取实时某个设备的 pgs 信息
export const queryRealTimeGps = params => get(`/api/data/monitorData/queryRealTimeGps/${params.deviceNo}`);
// 获取某个时间段某个设备的 gps 信息集合
export const queryTimeRangeGps = params => get('/api/data/monitorData/queryTimeRangeGps', params);
// 分配模版
export const setDataTemplate = params => post('/api/equip/equipment/setDataTemplate', params);

export const getEquipmentDetail = params => get(`api/equip/equipment/getMyEquipmentInfo/${params.id}`);
